<include file="public@header"/>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>修改个人资料</h5>
                    <div class="ibox-tools">
                        <a href="{:url('user/userInfo')}" class="btn btn-primary btn-xs active">个人信息</a>
                        <a href="{:url('setting/password')}" class="btn btn-primary btn-xs">修改密码</a>
                    </div>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal js-ajax-form margin-top-20" role="form" method="post" action="{:url('User/userinfoPost')}">
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('NICKNAME')}</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" id="input-user-nickname" name="user_nickname" value="{$user_nickname}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{:lang('GENDER')}</label>
                                <div class="col-md-8">
                                    <select class="form-control" name="sex" id="input-gender">
                                        <php>$sexs=array("0"=>lang('GENDER_SECRECY'),"1"=>lang('MALE'),"2"=>lang('FEMALE'));</php>
                                        <foreach name="sexs" item="vo">
                                            <php>$sexselected=$key==$sex?"selected":"";</php>
                                            <option value="{$key}" {$sexselected}>{$vo}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="input-site-name" class="col-sm-2 control-label">头像</label>
                                <div class="col-md-6 col-sm-10">
                            <div>
                                <input type="hidden" name="avatar" id="thumb" value="{$avatar}">
                                <a href="javascript:uploadOneImage('图片上传','#thumb');">
                                        <img src="{:cmf_get_image_preview_url($avatar)}" id="thumb-preview"
                                            width="135" style="cursor: hand"/>

                                </a>
                                <input type="button" class="btn btn-sm"
                                       onclick="$('#thumb-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
                                       value="取消图片">
                            </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{:lang('BIRTHDAY')}</label>
                                <div class="col-md-8">
                                   <input type="text" class="form-control js-bootstrap-date" id="input-birthday" name="birthday" value="{:date('Y-m-d',$birthday)}" placeholder="2008-08-08">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{:lang('WEBSITE')}</label>
                                <div class="col-md-8">
                                    <input type="text" class="form-control" id="input-user_url" name="user_url" value="{$user_url}" placeholder="">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{:lang('SIGNATURE')}</label>
                                <div class="col-md-8">
                                    <textarea class="form-control" id="input-signature" name="signature" placeholder="{:lang('SIGNATURE')}">{$signature}</textarea>
                                </div>
                            </div>                       
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary js-ajax-submit" type="submit">保存内容</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>